#include "AMRStitchCellTesselations2D.h"

// Not very interesting in 2D (and possibly not the most efficient way), but
// generalizes for 3D.
int tesselationArray2D[110] = {
    /* 1: */ 4, 0, 1, 2, 3, -1, /* 2: */ 4, 0, 1, 2, 3, -1,
    /* 3.1: */ 4, 0 ,1 ,2, 3, -1, /* 3.2: */ 3, 0, 1, 2, -1,
    /* 4: */ 4, 0, 1, 2, 3, -1, /* 5: */ 4, 0, 1, 2, 3, -1,
    /* 6.1: */ 4, 0, 1, 2, 3, -1, /* 6.2: */ 3, 0, 1, 2, -1,
    /* 7: */ 4, 0, 1, 2, 3, -1, /* 8: */ 4, 0, 1, 2, 3, -1,
    /* 9.1: */ 4, 0, 1, 2, 3, -1, /* 9.2: */ 3, 0, 1, 3, -1,
    /* 10: */ 4, 0, 1, 2, 3, -1, /* 11: */ 4, 0, 1, 2, 3, -1,
    /* 12.1: */ 4, 0, 1, 2, 3, -1, /* 12.2: */ 3, 0, 2, 3, -1,
    /* 13: */ 4, 0, 1, 2, 3, -1, /* 14: */ 4, 0, 1, 2, 3, -1,
    /* 15: */ 4, 0, 1, 2, 3, -1
};

// -1 marks illegal cases that cannot arise
int tesselationCaseStart2D[16][2] = {
    { -1, -1 }, { 0, -1 }, { 6, -1 }, { 12, 18 },
    { 23, -1 }, { 29, -1 }, { 35, 41 }, { 46, -1},
    { 52, -1, }, { 58, 64 }, { 69, -1 }, { 75, -1},
    { 81, 87 }, { 92, -1}, { 98, -1}, { 104, -1 }
};

int tesselationSubCaseDir2D[16] = { 0, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 0 };
